home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Display Manager / Display Manager Sample Code / DisplayVideo / DisplayVideo.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-24  |  18.1 KB  |  494 lines  |  [TEXT/CWIE]

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    MacOS™ Sample Code
  4. #    
  5. #    Written by: Eric Anderson
  6. #     email: eric3@apple.com
  7. #
  8. #    Display Manager sample code
  9. #
  10. #    DisplayVideo
  11. #
  12. #    DisplayVideo.c    -    C Source
  13. #
  14. #    Copyright © 1995 Apple Computer, Inc.
  15. #    All rights reserved.
  16. #
  17. #    1/28/97        ewa        Updated source for Metrowerks CodeWarrior 11
  18. #                        Fixed up formatting and generally made things nicer
  19. #    5/31/95        ewa        New today.
  20. #
  21. #    Components:    DisplayVideo.c            
  22. #
  23. #    DisplayVideo will display all info about all video modes supported by
  24. #    each installed video card with their attached monitor.
  25. #    The purpose of this code is to provide a sample of
  26. #    how developers can discover the bit depths and timings of multisync
  27. #    displays.
  28. #    
  29. #
  30. ------------------------------------------------------------------------------*/
  31.  
  32. #include <Dialogs.h>
  33. #include <Devices.h>
  34. #include <Displays.h>
  35. #include <Errors.h>
  36. #include <FixMath.h>
  37. #include <fp.h>
  38. #include <Gestalt.h>
  39. #include <Memory.h>
  40. #include <Palettes.h>
  41. #include <PLStringFuncs.h>
  42. #include <QuickDraw.h>
  43. #include <ROMDefs.h>
  44. #include <Slots.h>
  45. #include <StdIO.h>
  46. #include <Video.h>
  47. #include <TextUtils.h>
  48. #include <Strings.h>
  49.  
  50. #include <stdlib.h>
  51.  
  52. //--------------------------------------------------------------
  53. //
  54. // Internal defines, structs, typedefs, and routine declarations
  55. //
  56. //--------------------------------------------------------------
  57. struct DepthInfo {
  58.     VDSwitchInfoRec            depthSwitchInfo;            // This is the switch mode to choose this timing/depth
  59.     VPBlock                    depthVPBlock;                // VPBlock (including size, depth and format)
  60. };
  61. typedef struct DepthInfo DepthInfo;
  62.  
  63. struct ListIteratorDataRec {
  64.     unsigned long            displayModeFlags;            // 
  65.     VDSwitchInfoRec            displayModeSwitchInfo;        //
  66.     VDResolutionInfoRec        displayModeResolutionInfo;    //
  67.     VDTimingInfoRec            displayModeTimingInfo;        // Contains timing flags and such
  68.     unsigned long            depthBlockCount;            // How many depths available for a particular timing
  69.     DepthInfo                *depthBlocks;                // Array of DepthInfo
  70.     Str255                    displayModeName;            // name of the timing mode
  71. };
  72. typedef struct ListIteratorDataRec ListIteratorDataRec;
  73.  
  74. void PrintCurrentVideoSetting (GDHandle walkDevice);
  75.  
  76. void DisplayVideoSettings (void);
  77.  
  78. void PrintAvailableVideoSettingsDM1 (GDHandle walkDevice);
  79.  
  80. void PrintAvailableVideoSettingsDM2 (GDHandle walkDevice,
  81.                                 DMDisplayModeListIteratorUPP myModeIteratorProc,
  82.                                 DMListIndexType theDisplayModeCount,
  83.                                 DMListType *theDisplayModeList);
  84.  
  85. pascal void ModeListIterator (    void *userData,
  86.                                 DMListIndexType itemIndex,
  87.                                 DMDisplayModeListEntryPtr displaymodeInfo);
  88.  
  89. // routine implementations
  90. void main(void)
  91. {
  92.     DisplayVideoSettings ();
  93. }
  94.  
  95.  
  96. //--------------------------------------------------------------
  97. //
  98. // Implementation of sample code
  99. //
  100. //--------------------------------------------------------------
  101. void PrintCurrentVideoSetting (GDHandle walkDevice)
  102. {
  103.     unsigned long        displayMgrVersion;
  104.     OSErr                error = paramErr;
  105.     CntrlParam            pBlock;
  106.     VDSwitchInfoRec        switchInfo;
  107.     AuxDCEHandle        theDCE;
  108.     VDSwitchInfoRec        videoMode;        
  109.  
  110.     Gestalt(gestaltDisplayMgrVers, (long*)&displayMgrVersion);
  111.     if (displayMgrVersion >= 0x00020000)
  112.     {    // get the info the DM 2.0 way
  113.         error = DMGetDisplayMode(walkDevice, &switchInfo);
  114.         if (noErr == error)
  115.         {
  116.             printf ("Current Settings DM2 - displayMode: %d, depthMode: %d\n", switchInfo.csData, switchInfo.csMode);
  117.         }
  118.         return;
  119.     }
  120.     else
  121.     {    // get the info the DM 1.0 way
  122.         videoMode.csMode = -1;        // init to bogus value
  123.         videoMode.csData = -1;        // init to bogus value            
  124.         pBlock.ioNamePtr = nil;
  125.         pBlock.ioCRefNum = (*(walkDevice))->gdRefNum;
  126.         pBlock.csCode = cscGetCurMode;
  127.         *(Ptr *)&pBlock.csParam[0] = (Ptr)&videoMode;
  128.             
  129.         error = PBStatusSync((ParmBlkPtr )&pBlock);    // ask the driver first....since we trust it the most
  130.             
  131.         if ( noErr == error && ((-1 == videoMode.csMode) || (-1 == videoMode.csData)) )
  132.             error = statusErr;
  133.         
  134.         if (noErr != error)    // if the driver has no clue fill it videoMode by hand as a last resort
  135.         {    
  136.             theDCE = (AuxDCEHandle)GetDCtlEntry((*(walkDevice))->gdRefNum);
  137.             
  138.             if( theDCE )
  139.             {
  140.                 videoMode.csData = (unsigned char)(*theDCE)->dCtlSlotId; 
  141.                 videoMode.csMode = (*(walkDevice))->gdMode;
  142.                 error = noErr;
  143.             }
  144.         }
  145.         if (noErr == error)
  146.         {
  147.             printf ("Current Settings DM1 - displayMode: %d, depthMode: %d\n", videoMode.csData, videoMode.csMode);
  148.         }
  149.         return;
  150.     }
  151. }
  152.  
  153.  
  154. void DisplayVideoSettings (void)
  155. {
  156.     Boolean                            displayMgrPresent;
  157.     short                            iCount = 0;                    // just a counter of GDevices we have seen
  158.     DMDisplayModeListIteratorUPP    myModeIteratorProc = nil;    // for DM2.0 searches
  159.     SpBlock                            spBlock;
  160.     Boolean                            suppliedGDevice;    
  161.     DisplayIDType                    theDisplayID;                // for DM2.0 searches
  162.     DMListIndexType                    theDisplayModeCount;        // for DM2.0 searches
  163.     DMListType                        theDisplayModeList;            // for DM2.0 searches
  164.     long                            value = 0;
  165.     GDHandle                        walkDevice = nil;            // for everybody
  166.  
  167.     Gestalt(gestaltDisplayMgrAttr,&value);
  168.     displayMgrPresent=value&(1<<gestaltDisplayMgrPresent);
  169.     displayMgrPresent=displayMgrPresent && (SVersion(&spBlock)==noErr);    // need slot manager
  170.     if (displayMgrPresent)                                                // and Display Manager
  171.     {    
  172.         walkDevice = DMGetFirstScreenDevice (dmOnlyActiveDisplays);            // for everybody
  173.         suppliedGDevice = false;
  174.         
  175.         myModeIteratorProc = NewDMDisplayModeListIteratorProc(ModeListIterator);    // for DM2.0 searches
  176.     
  177.         // Note that we are hosed if somebody changes the gdevice list behind our backs while we are iterating....
  178.         // ...now do the loop if we can start
  179.         if( walkDevice && myModeIteratorProc) do // start the search
  180.         {
  181.             iCount++;        // GDevice we are looking at (just a counter)
  182.             printf("=================================================\n");
  183.             printf("GDevice #%d (0x%X) at location (%d,%d).\n",iCount, *walkDevice, (long )(*walkDevice)->gdRect.left, (long )(*walkDevice)->gdRect.top);
  184.             printf("=================================================\n\n");
  185.  
  186.             PrintCurrentVideoSetting (walkDevice);
  187.             
  188.             if( noErr == DMGetDisplayIDByGDevice( walkDevice, &theDisplayID, false ) )    // DM1.0 does not need this, but it fits in the loop
  189.             {
  190.                 theDisplayModeCount = 0;    // for DM2.0 searches
  191.                 if (noErr == DMNewDisplayModeList(theDisplayID, 0, 0, &theDisplayModeCount, &theDisplayModeList) )
  192.                 {
  193.                     // search NuBus & PCI the new kool way through Display Manager 2.0
  194.                 //    printf("\nAvailable Video Settings DM2.0 way\n");
  195.                     PrintAvailableVideoSettingsDM2 (walkDevice, myModeIteratorProc, theDisplayModeCount, &theDisplayModeList);
  196.                     DMDisposeList(theDisplayModeList);    // now toss the lists for this gdevice and go on to the next one
  197.                 }
  198.                 else
  199.                 {
  200.                     // search NuBus only the old disgusting way through the slot manager
  201.                     printf("\nAvailable Video Settings DM1.0 way\n");
  202.                     PrintAvailableVideoSettingsDM1 (walkDevice);
  203.                 }
  204.             }
  205.  
  206.             printf("\n\n\n");
  207.  
  208.         } while ( !suppliedGDevice && nil != (walkDevice = DMGetNextScreenDevice ( walkDevice, dmOnlyActiveDisplays )) );    // go until no more gdevices
  209.         if( myModeIteratorProc )
  210.             DisposeRoutineDescriptor(myModeIteratorProc);
  211.         return;
  212.     }
  213. }
  214.  
  215. void PrintAvailableVideoSettingsDM1 (GDHandle walkDevice)
  216. {
  217.     AuxDCEHandle myAuxDCEHandle;
  218.     unsigned long    depthMode;
  219.     unsigned long    displayMode;
  220.     OSErr            error;
  221.     OSErr            errorEndOfTimings;
  222.     short            height;
  223.     short            jCount = 0;
  224.     Boolean            modeOk;
  225.     SpBlock            spAuxBlock;
  226.     SpBlock            spBlock;
  227.     unsigned long    switchFlags;
  228.     VPBlock            *vpData;
  229.     short            width;
  230.  
  231.     myAuxDCEHandle = (AuxDCEHandle) GetDCtlEntry((**walkDevice).gdRefNum);    
  232.     spBlock.spSlot = (**myAuxDCEHandle).dCtlSlot;
  233.     spBlock.spID = (**myAuxDCEHandle).dCtlSlotId;
  234.     spBlock.spExtDev = (**myAuxDCEHandle).dCtlExtDev;
  235.     spBlock.spHwDev = 0;                                // we are going to get this pup
  236.     spBlock.spParamData = 1<<foneslot;                    // this slot, enabled, and it better be here.
  237.     spBlock.spTBMask = 3;                                // don't have constants for this yet
  238.     errorEndOfTimings = SGetSRsrc(&spBlock);            // get the spDrvrHW so we know the ID of this puppy. This is important
  239.                                                         // since some video cards support more than one display, and the spDrvrHW
  240.                                                         // ID can, and will, be used to differentiate them.
  241.     
  242.     if ( noErr == errorEndOfTimings )
  243.     {
  244.         // reinit the param block for the SGetTypeSRsrc loop, keep the spDrvrHW we just got
  245.         spBlock.spID = 0;                                // start at zero, 
  246.         spBlock.spTBMask = 2;                            // 0b0010 - ignore DrvrSW - why ignore the SW side? Is it not important for video?
  247.         spBlock.spParamData = (1<<fall) + (1<<foneslot) + (1<<fnext);    // 0b0111 - this slot, enabled or disabled, so we even get 640x399 on Blackbird
  248.         spBlock.spCategory=catDisplay;
  249.         spBlock.spCType=typeVideo;
  250.         errorEndOfTimings = SGetTypeSRsrc(&spBlock);    // but only on 7.0 systems, not a problem since we require DM1.0
  251.         
  252.         // now, loop through all the timings for this GDevice
  253.         if ( noErr == errorEndOfTimings ) do
  254.         {
  255.             // now, loop through all possible depth modes for this timing mode
  256.             displayMode = (unsigned char)spBlock.spID;    // "timing mode, ie:resource ref number"
  257.             for (jCount = firstVidMode; jCount<= sixthVidMode; jCount++)
  258.             {
  259.                 depthMode = jCount;        // vid mode
  260.                 error = DMCheckDisplayMode(walkDevice,displayMode,depthMode,&switchFlags,0,&modeOk);
  261.     
  262.                 // only if the mode okay
  263.                 if (noErr == error && modeOk)
  264.                 {
  265.                     // have a good displayMode/depthMode combo - now lets look inside
  266.                     spAuxBlock = spBlock;                // don't ruin the iteration spBlock!!
  267.                     spAuxBlock.spID = depthMode;        // vid mode
  268.                     error=SFindStruct(&spAuxBlock);        // get back a new spsPointer
  269.                     if (noErr == error)                    // keep going if no error…
  270.                     {
  271.                         spAuxBlock.spID = 0x01;            // mVidParams request
  272.                         error=SGetBlock (&spAuxBlock);    // use the new spPointer and get back...a NewPtr'ed spResult
  273.                         if (noErr == error)                // …keep going if no error…
  274.                         {                                // We have data! lets have a look
  275.                             vpData = (VPBlock*)spAuxBlock.spResult;
  276.                             height = vpData->vpBounds.bottom;    // left and top are usually zero
  277.                             width = vpData->vpBounds.right;
  278.                             
  279.                             // print screen data
  280.                             printf("\nTiming Mode: %d\n", displayMode);
  281.                             printf("Depth Mode: %d, Depth: %d, Resolution: %dH x %dV\n",
  282.                                 depthMode,
  283.                                 vpData->vpPixelSize,
  284.                                 vpData->vpBounds.right,
  285.                                 vpData->vpBounds.bottom);
  286.                             printf("Components per Pixel: %d, bits per Component: %d\n",
  287.                                 vpData->vpCmpCount,
  288.                                 vpData->vpCmpSize);
  289.                             printf("Switch flags:\n");
  290.                             if (switchFlags & 1<<kNoSwitchConfirmBit)
  291.                                 printf("      Confirmation not required,\n");
  292.                             else
  293.                                 printf("      Confirmation required,\n");
  294.                             if (switchFlags & 1<<kDepthNotAvailableBit)
  295.                                 printf("      Current depth not available in this mode,\n");
  296.                             else
  297.                                 printf("      Current depth available in this mode,\n");
  298.                             if (switchFlags & 1<<kShowModeBit)
  299.                                 printf("      Always shown,\n");
  300.                             else
  301.                                 printf("      Not always shown,\n");
  302.                             if (switchFlags & 1<<kModeNotResizeBit)
  303.                                 printf("      Not resizeable,\n");
  304.                             else
  305.                                 printf("      Resizeable\n");
  306.  
  307.                             if (spAuxBlock.spResult) DisposePtr ((Ptr)spAuxBlock.spResult);    // toss this puppy when done
  308.                         }
  309.                     }
  310.                 }
  311.             }
  312.             // go around again, looking for timing modes for this GDevice
  313.             spBlock.spTBMask = 2;        // ignore DrvrSW
  314.             spBlock.spParamData =  (1<<fall) + (1<<foneslot) + (1<<fnext);    // next resource, this slot, whether enabled or disabled
  315.             errorEndOfTimings = SGetTypeSRsrc(&spBlock);    // and get the next timing mode
  316.         } while ( noErr == errorEndOfTimings );    // until the end of this GDevice
  317.     }
  318.  
  319. }
  320.  
  321. pascal void ModeListIterator(void *userData, DMListIndexType, DMDisplayModeListEntryPtr displaymodeInfo)
  322. {
  323.     unsigned long            depthCount;
  324.     short                    iCount;
  325.     ListIteratorDataRec        *myIterateData        = (ListIteratorDataRec*) userData;
  326.     DepthInfo                *myDepthInfo;
  327.     
  328. // printf ("\n now in ModeListIterator\n");
  329.     // set display data in a round about way
  330.     // Set the basics
  331.     myIterateData->displayModeFlags                = displaymodeInfo->displayModeFlags;        // Info on this particular display mode
  332.     myIterateData->displayModeSwitchInfo        = *displaymodeInfo->displayModeSwitchInfo;    // not needed - depth info has this per depth
  333.     myIterateData->displayModeResolutionInfo    = *displaymodeInfo->displayModeResolutionInfo;    // refresh rate, pixels/lines at max depth 
  334.     myIterateData->displayModeTimingInfo        = *displaymodeInfo->displayModeTimingInfo;    // to get the flags on timing mode
  335.     PLstrcpy ((StringPtr)&myIterateData->displayModeName, (ConstStr255Param)*displaymodeInfo->displayModeName);    // the name of the mode
  336.     
  337.     // now get the DMDepthInfo into memory we own
  338.     depthCount = displaymodeInfo->displayModeDepthBlockInfo->depthBlockCount;
  339.     myDepthInfo = (DepthInfo*)NewPtrClear(depthCount * sizeof(DepthInfo));
  340.  
  341.     // set the info for the caller
  342.     myIterateData->depthBlockCount = depthCount;
  343.     myIterateData->depthBlocks = myDepthInfo;
  344.  
  345.     // and fill out all the entries
  346.     if (depthCount) for (iCount=0; iCount < depthCount; iCount++)
  347.     {
  348.         myDepthInfo[iCount].depthSwitchInfo = 
  349.             *displaymodeInfo->displayModeDepthBlockInfo->depthVPBlock[iCount].depthSwitchInfo;
  350.         myDepthInfo[iCount].depthVPBlock = 
  351.             *displaymodeInfo->displayModeDepthBlockInfo->depthVPBlock[iCount].depthVPBlock;
  352.     }
  353. }
  354.  
  355. void PrintAvailableVideoSettingsDM2 (GDHandle walkDevice,
  356.                             DMDisplayModeListIteratorUPP myModeIteratorProc,
  357.                             DMListIndexType theDisplayModeCount,
  358.                             DMListType *theDisplayModeList)
  359. {
  360.     short                    jCount;
  361.     short                    kCount;
  362.     ListIteratorDataRec        searchData;
  363.     double_t                refreshRate;
  364.     unsigned long            switchFlags;
  365.     Boolean                    modeOk;
  366.     OSErr                    error;
  367.  
  368.     searchData.depthBlocks = nil;
  369.     // get the mode lists for this GDevice
  370. // printf ("\n about to start DMGetIndexedDisplayModeFromList loop\n");
  371.     for (jCount=0; jCount<theDisplayModeCount; jCount++)        // get info on all the resolution timings
  372.     {
  373.         DMGetIndexedDisplayModeFromList(*theDisplayModeList, jCount, 0, myModeIteratorProc, &searchData);
  374. // printf ("\n just did a DMGetIndexedDisplayModeFromList\n");
  375.         
  376.         // only if the mode is valid
  377. //        if    (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeValid)
  378.         {
  379.             // for all the depths for this resolution timing (mode)...
  380.             printf("\nTiming mode: %d (or  0x%X) named “%s”\n",
  381.                         searchData.depthBlocks[0].depthSwitchInfo.csData,
  382.                         searchData.depthBlocks[0].depthSwitchInfo.csData,
  383.                         P2CStr(searchData.displayModeName));
  384.         
  385.             refreshRate = Fix2X (searchData.displayModeResolutionInfo.csRefreshRate);
  386.             refreshRate = round (refreshRate);
  387.             if (refreshRate == 0)
  388.                 printf ("Refresh rate: 0 (not defined in displayModeResolutionInfo.csRefreshRate)\n");
  389.             else
  390.                 printf ("Refresh rate: %g\n", refreshRate);
  391.             
  392.             if (searchData.displayModeResolutionInfo.csResolutionFlags & 1<<kResolutionHasMultipleDepthSizes)
  393.                 printf("DisplayMode has different H&V per bit depth\n");
  394.             else
  395.                 printf("DisplayMode does not have different H&V per bit depth\n");
  396.  
  397.             {
  398.                 char        tempArr[6];
  399.                 ResType*    tempPtr = (ResType* )&tempArr[0];                    // Make a convenient ptr to assign the restype
  400.                 *tempPtr = searchData.displayModeTimingInfo.csTimingFormat;        // contents of string are the resType
  401.                 tempArr[4] = 0;                                                    // null temp the string
  402.                 printf("Timing format: “%s”. Timing csData %d\n", tempArr, searchData.displayModeTimingInfo.csTimingData);
  403.             }
  404.             
  405.             printf("Available depths:\n");
  406.  
  407.  
  408.             if (searchData.depthBlockCount) for (kCount = 0; kCount < searchData.depthBlockCount; kCount++)
  409.             {
  410.                 // print all the timing information 
  411.                 printf("    Depth: %d, Depth mode: 0x%X, Resolution: %dH x %dV\n",
  412.                     searchData.depthBlocks[kCount].depthVPBlock.vpPixelSize,
  413.                     searchData.depthBlocks[kCount].depthSwitchInfo.csMode,
  414.                     searchData.depthBlocks[kCount].depthVPBlock.vpBounds.right,
  415.                     searchData.depthBlocks[kCount].depthVPBlock.vpBounds.bottom);
  416.         //        printf("Components per Pixel: %d, bits per Component: %d\n",
  417.         //            searchData.depthBlocks[kCount].depthVPBlock.vpCmpCount,
  418.         //            searchData.depthBlocks[kCount].depthVPBlock.vpCmpSize);
  419.                     
  420.  
  421.             }
  422.             
  423.             error = DMCheckDisplayMode(walkDevice,
  424.                         searchData.depthBlocks[0].depthSwitchInfo.csData,
  425.                         searchData.depthBlocks[0].depthSwitchInfo.csMode,
  426.                         &switchFlags,
  427.                         0,
  428.                         &modeOk);
  429.                         
  430.             if (noErr == error && modeOk)
  431.             {
  432.                 printf("Switch flags = 0x%X\n", switchFlags);
  433.                 if (switchFlags & 1<<kNoSwitchConfirmBit)
  434.                     printf("      Confirmation not required,\n");
  435.                 else
  436.                     printf("      Confirmation required,\n");
  437.                 if (switchFlags & 1<<kDepthNotAvailableBit)
  438.                     printf("      Current depth not available in this mode,\n");
  439.                 else
  440.                     printf("      Current depth available in this mode,\n");
  441.                 if (switchFlags & 1<<kShowModeBit)
  442.                     printf("      Always shown,\n");
  443.                 else
  444.                     printf("      Not always shown,\n");
  445.                 if (switchFlags & 1<<kModeNotResizeBit)
  446.                     printf("      Not resizeable,\n");
  447.                 else
  448.                     printf("      Resizeable\n");
  449.             }
  450.  
  451.             // timing flags
  452.             printf("Timing flags = 0x%X\n",searchData.displayModeTimingInfo.csTimingFlags);
  453.             if (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeValid)
  454.                 printf("      Valid,\n",searchData.displayModeTimingInfo.csTimingFlags);
  455.             else
  456.                 printf("      Invalid,\n",searchData.displayModeTimingInfo.csTimingFlags);
  457.             if (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeSafe)
  458.                 printf("      Safe,\n");
  459.             else
  460.                 printf("      Unsafe,\n");
  461.                     if (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeDefault)
  462.                 printf("      Default,\n");
  463.             else
  464.                 printf("      Not default,\n");
  465.                     if (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeShowNow)
  466.                 printf("      Always shown,\n");
  467.             else
  468.                 printf("      Not always shown,\n");
  469.             if (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeNotResize)
  470.                 printf("      Not resizeable,\n");
  471.             else
  472.                 printf("      Resizeable,\n");
  473.             if (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeRequiresPan)
  474.                 printf("      Requires pan.\n");
  475.             else
  476.                 printf("      No pan.\n");
  477.                 
  478.             // mode flags
  479.             printf("Mode flags = 0x%X\n",searchData.displayModeFlags);
  480.             if (searchData.displayModeFlags & 1<<0)
  481.                 printf("      Stripped,\n");
  482.             else
  483.                 printf("      Not Stripped,\n");
  484.         }
  485.  
  486.         if (searchData.depthBlocks)
  487.         {
  488.             DisposePtr ((Ptr)searchData.depthBlocks);    // toss for this timing mode of this gdevice
  489.             searchData.depthBlocks = nil;                // init it just so we know
  490.         }
  491.     }
  492. }
  493.  
  494.